1. Field of the Invention
The present invention relates to integrated circuits, and in particular, to integrated circuits which provide for the dynamic adjustment of reference voltages.
2. Description of the Prior Art
Computer mice are commonly used for data input and cursor positioning. A conventional computer mouse has a rolling ball that is housed within the housing of a computer mouse. The ball is rolled as the mouse is moved by a user on a mouse pad or flat surface. The ball is contacted by at least two encoder wheel assemblies, one encoder wheel assembly for the X-axis and one encoder wheel assembly for the Y-axis. Each encoder wheel assembly includes a shaft and an encoder wheel having a plurality of slits. A light-emitting element (such as an LED) and a light-receiving element (such as a phototransistor) are positioned on opposite sides of each encoder wheel. Rotation of the ball causes the shafts to rotate, thereby rotating the encoder wheels. As each encoder wheel rotates, its corresponding phototransistor receives pulses of light from the corresponding LED if the LED and the phototransistor are aligned with a slit, otherwise no light is received by the phototransistor. The phototransistor converts the received light pulses into electrical signals.
The electrical signals generated by each phototransistor will assume a generally sinusoidal pattern, as illustrated in FIG. 1. The sine wave represents the passage of one slit through the light path of the LED. For example, at the beginning, represented by the point A1, only a small part of the slit is in the light path of the LED, so only a small amount of light is received by the phototransistor and a small electrical signal is produced. As a larger portion of the slit is in the light path of the LED, increasingly more light is received by the phototransistor and a proportionally larger electrical signal is produced (represented by the point A2 in FIG. 1) until the entire slit is in the light path of the LED, when the maximum amount of light is received by the phototransistor and the largest electrical signal is produced. This point is represented by the maximum or peak "PEAK" in the sine wave. After reaching this PEAK, the portion of the slit which is in the light path of the LED begins to decrease, thereby reducing the amount of light received by the phototransistor so that a decreasing electrical signal is produced. This is represented by the point B1 in FIG. 1. This continues until only a small part of the slit is again in the light path of the LED, during which only a small amount of light is received by the phototransistor and another small electrical signal is produced. This point is represented by point B2 in FIG. 1. Finally, the minimum or valley "VALLEY" in the sine wave represents the point when the light path between the LED and the phototransistor is completely blocked. The same cycle is then repeated for the other slits in the encoder wheel.
Thus, the point "PEAK" represents the instant in the sine wave when a slit is completely open, and the point "VALLEY" represents the time when the light path between the LED and the phototransistor is completely blocked by the encoder wheel. When the light path is completely blocked, the voltage V should ideally be equal to zero. However, the phototransistor will typically still maintain a very low leakage current which is due to the possibility that the environment of the phototransistor is not completely dark, or that minimal light may still have passed through the slit.
The continuous pulse signals generated by each phototransistor is compared with a fixed reference voltage to determine whether the phototransistor is conducted (i.e., light passes through the slit) or cut-off (i.e., no light passes through the slit). After the comparison, the pulse signals from these phototransistors are processed by a logic controller to represent the distance and orientation (i.e., X and Y orientations) of the movement of the mouse.
FIG. 2 illustrates a conventional reference voltage generator that is used for generating a reference voltage. The output of phototransistor PT is coupled to a comparator 10 to determine whether the phototransistor PT is conducted or cut-off, based on a fixed reference voltage Vref. The Vref is normally selected to be the mid-point of the PEAK and the VALLEY generated by the phototransistor PT. If an input voltage from the phototransistor PT is higher than Vref, the phototransistor PT is considered to be conducted, otherwise it is considered to be cut-off.
In the conventional reference voltage generator, Vref is predetermined and fixed. However, a fixed Vref suffers from the drawback that the input voltage from phototransistor PT cannot be correctly detected if the input voltage is below or above a predetermined range associated with Vref. For example, using a 10 kilo-ohm input resistance, if an input sine wave current is between 0-500 microamps, which has an input voltage of 0-5 V, the Vref can be fixed at 2.5 V. An input which is below the value of Vref, such as an input of 0-200 microamps (which has an input voltage of 0-2 V ), may not be considered to be a cut-off signal. Similarly, an input which is above the value of Vref, such as an input of 300-500 microamps (which has an input voltage of 3-5 V), may not be considered to be a conduction signal either. As a result, input signals are often incorrectly bypassed by the comparator 10. This problem results in erroneous distance and orientation measurements for the mouse, making usage of the mouse difficult and frustrating.
Thus, there still remains a need for a reference voltage adjuster which overcomes the drawbacks of the conventional reference voltage generators, and which provides for accurate processing of the input signals received from the phototransistors.